<?php

namespace app\common\model\mycurrency;

use think\Exception;
use think\Model;
use traits\model\SoftDelete;

class OperateCouponsReceive extends Model
{

    //use SoftDelete;

    

    // 表名
    protected $name = 'mycurrency_operate_coupons_receive';

    // 追加属性
    protected $append = [
    ];

    const DISCOUNT_TYPE_ZHEKOU          = 1;//优惠券类型 = 折扣
    const DISCOUNT_TYPE_MANJIAN         = 2;//优惠券类型 = 满减
    const DISCOUNT_TYPE_LIJIAN          = 3;//优惠券类型 = 立减

    const STATUS_SHIXIAO = -1;//状态 = 已失效
    const STATUS_WEISHIYONG = 1;//状态 = 未使用
    const STATUS_YISHIYONG = 2;//状态 = 已使用

    public function getUseStartTimeAttr($value){
        return $value != null ? date('Y-m-d', $value) : '';
    }

    public function getUseEndTimeAttr($value){
        return $value != null ? date('Y-m-d', $value) : '';
    }


}
